package com.imooc.dao;

import com.imooc.entity.Product;
import com.imooc.entity.ProductCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductCategoryMapper {
    int deleteByPrimaryKey(Integer productCategoryId);

    int insert(ProductCategory record);

    int insertSelective(ProductCategory record);

    ProductCategory selectByPrimaryKey(Integer productCategoryId);

    int updateByPrimaryKeySelective(ProductCategory record);

    int updateByPrimaryKey(ProductCategory record);

    /**
     * 批量增加商品的分类信息
     * @param productCategoryList
     * @return
     */
    int batchInsertProductCategory(List<ProductCategory> productCategoryList);

    /**
     * 根据shopId查询店铺的商品分类信息
     */
    List<ProductCategory> queryByShopId(int shopId);

    /**
     * 删除制定的商品类别
     * @param productCategoryId
     * @param shopid
     * @return
     */
    int deleteProductCategory(@Param("productCategoryId") int productCategoryId, @Param("shopId") int shopId);
}